aa=size(ans.end_x.signals.values);
aa=aa(3);


DiscreteX = ans.end_x.signals.values(:,:,aa);
DiscreteY = ans.end_y.signals.values(:,:,aa);
DiscreteYaw = ans.end_yaw.signals.values(:,:,aa);
DiscreteCur = ans.end_cur.signals.values(:,:,aa);

StartX = ans.start_x.signals.values(:,:,aa);
StartY = ans.start_y.signals.values(:,:,aa);
StartYaw = ans.start_yaw.signals.values(:,:,aa);
StartCur = ans.start_cur.signals.values(:,:,aa);
StartIndex = ans.start_index.signals.values(:,:,aa);

DiscreteNum=300;
lengthx = length(DiscreteX);
for i=1:lengthx
    if abs(DiscreteX(i))<0.0001
        DiscreteNum = i-1;
        break  
    end
end

DiscreteX = single(DiscreteX);
DiscreteY = single(DiscreteY);
DiscreteYaw = single(DiscreteYaw);
DiscreteCur = single(DiscreteCur);
DiscreteNum = uint16(DiscreteNum);

%%对应的路径的店